package Data;

public class GridData {
  private int totalSample = 0; // Total sample anywhere on grid
  private int mXhome = 0; // Location of home x coordinate
  private int mYhome = 0; // Location of home y coordinate
  private CellData[][] allCells; // array of cells making up grid
  public int BoardSize;
  public boolean Stuck;
  
  public Boolean hasSample(int grid_x, int grid_y)
  {
      return allCells[grid_x][grid_y].hasSample(); 
  }
  
  public Boolean hasAnything(int grid_x, int grid_y)
  {
      return allCells[grid_x][grid_y].hasAnything();
  }
  
  public void dropLoad(int grid_x, int grid_y, int carryAmt)
  {
      allCells[grid_x][grid_y].dropLoad(carryAmt); 
  }
  
  public int pickUpLoad(int grid_x, int grid_y, int amt)
  {
      return allCells[grid_x][grid_y].pickUpLoad(amt); 
  }
  
  public Boolean isObstacle(int grid_x, int grid_y)
  {
      return allCells[grid_x][grid_y].isObstacle();
  }
  
  public int XHome()
  {  
	  return mXhome;
  }
  
  public int YHome()
  {  
	 return mYhome;
  }
  
  public GridData(int boardSize)
  {
	  BoardSize = boardSize;
      mXhome = boardSize / 2;
      mYhome = boardSize / 2;
  }
}



